#include <iostream>
#include <string>
#include "person.pb.h"

int main()
{

    person::Person pn;

    pn.set_id(1);
    pn.set_name("liang zi");
    pn.set_email("da wei dai @liang zi ");

    std::string sg = pn.SerializeAsString();

    std::cout << "序列化： " << sg << std::endl;

    person::Person newpn;

    newpn.ParseFromString(sg);

    std::cout << newpn.DebugString();
}